<%
Session.Timeout = 60
response.buffer = true
'response.buffer = false
'response.write "here1"
function URLDecode(str)              
                dim re   
                set re = new RegExp       
                str = Replace(str, "+", " ")             
                re.Pattern = "%([0-9a-fA-F]{2})"                
                re.Global = True               
                URLDecode = re.Replace(str, GetRef("URLDecodeHex"))
end function 

' Replacement function for the above

function URLDecodeHex(match, hex_digits, pos, source)             
                URLDecodeHex = chr("&H" & hex_digits)
end function

 

function RegexMatch(strOriginalString, strPattern, varIgnoreCase)
    dim objRegExp : set objRegExp = new RegExp
    with objRegExp
        .Pattern = strPattern
        .IgnoreCase = varIgnoreCase
        .Global = True

    end with

    RegexMatch = objRegExp.test(strOriginalString)

    set objRegExp = nothing

end function

Function QueryStringCheck()
	dim stringlist(10)
	strQuery = UCase(Request.ServerVariables("Query_String"))
'	strQuery = Replace(URLDecode(strQuery)," ","")
	strQuery = URLDecode(strQuery)
	'response.write strQuery
	instring = 0

	if ((RegexMatch(strQuery, ".*exec.*",true) = "True") or (RegexMatch(strQuery, ".*skip.*",true) = "True") or (RegexMatch(strQuery, ".*insert.*",true) = "True") or (RegexMatch(strQuery, ".*update.*",true) = "True") or (RegexMatch(strQuery, ".*delete.*",true) = "True") or (RegexMatch(strQuery, ".*DECLARE @.*",true) = "True") or (RegexMatch(strQuery, ".*DECLARE%.*",true) = "True") or (RegexMatch(strQuery, ".*DEC%LARE.*",true) = "True")  or (RegexMatch(strQuery, ".*BS%ET.*",true) = "True") or (RegexMatch(strQuery, ".*';.*",true) = "True")) then
			instring = 1
	end if
	if instring = 1 then
		response.redirect("500.asp?badscript="&request.ServerVariables("URL") & strQuery)
	end if
end function
QueryStringCheck()

'conStr =   "PROVIDER=SQLOLEDB; dsn=aincent;initial catalog=CallCenter;uid=ai;pwd=aincentive;"
'conStrFE = "PROVIDER=SQLOLEDB; dsn=FE_SQL;initial catalog=FE;uid=FE;pwd=Fr2468cB;"
'conStr =   "Provider=sqloledb;Data Source=(local);Initial Catalog=CallCenter;Integrated Security=SSPI;"
'conStr = "PROVIDER=SQLOLEDB; dsn=CallCenter;initial catalog=callcenter;Integrated Security=SSPI;"
conStr = "PROVIDER=SQLOLEDB; dsn=CallCenter;initial catalog=CallCenter;uid=FE;pwd=Fr2468cB;"

smtp ="127.0.0.1"
authentication ="false"
mailuser ="info"
mailPassword = ""
'adminMail ="admin@agentscashincentive.com"

'adminMail = "jeropenam@hotmail.com"
adminMail = "admin@gmail.com"
SiteURL = "localhost:8000"
ListingSize = 10
'supportMail ="chrisburres@e-webstyle.com"
edCode = "CallCenter"
conIV = "Thisisthevector"
%>